package com.phiture.erp.produce.dal.pojo.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;

@Schema(description = "管理后台 - 生产任务 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ErpProductionTaskRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18362")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("任务名称")
    private String name;

    @Schema(description = "销售单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "xdsd-2023-001")
    @ExcelProperty("销售单号")
    private String saleOrderNo;

    @Schema(description = "任务编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("任务编码")
    private String productionTaskNo;

    @Schema(description = "主计划编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "12077")
    @ExcelProperty("主计划编码")
    private String productMainPlanNo;

    @Schema(description = "生产路线ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12077")
    private Long produceRoutingId;

    @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
    private Long materialId;

    @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "11.11")
    private String materialNumber;

    @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("物料名称")
    private String materialName;

    @Schema(description = "物料规格", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("物料规格")
    private String materialSpec;

    @Schema(description = "物料单位名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("物料单位名称")
    private String materialUnit;

    @Schema(description = "计划生产数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("计划生产数量")
    private Integer plannedQuantity;

    @Schema(description = "实际生产数量")
    @ExcelProperty("实际生产数量")
    private Integer actualQuantity;

    @Schema(description = "优先级")
//    @ExcelProperty("优先级")
    private Integer priority;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("状态")
    private Integer status;

    @ExcelProperty("状态")
    private String statusName;

    @Schema(description = "开工时间")
    @ExcelProperty("开工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate startDate;

    @Schema(description = "完工时间")
    @ExcelProperty("完工时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate endDate;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "工序名称", example = "工序1")
    private String processName;

    @Schema(description = "是否最终工序", example = "1")
    private Integer finalProcess;

    @Schema(description = "生产任务单工序")
    private Long taskProcessId;

    @Schema(description = "工序ID")
    private Long processId;

}